﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="format-detection" content="telephone=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
    <title>个人中心</title>
    <link rel="stylesheet" href="css/style.css?v=1.11">
    <link rel="stylesheet" href="css/index.css?v=1.11">
    <script src="js/jquery-1.8.3.min.js?v=1.11"></script>
    <script src="js/flexible.js?v=1.11"></script>
    <script src="layer-mobile/layer.js?v=1.11"></script>
</head>
	<body>
        <div class="user">
            <div class="user-info">
                <img src="image/defaultAvatar.png" class="info-pic">
                <p class="user-name"></p>
                <p class="user-rank"></p>
                <span class="user-ident"></span> <span class="user-grade"></span>
            </div>
            <div class="user-list">
                <ul>
                    <li><a href="property.html" id="proterty"><i><img src="image/property.png" /></i><span>我的资产</span><i class="fr arrow"></i></a></li>
                    <li><a href="wallet.html" id="wallet"><i class="fl"><img src="image/purse.png" /></i><span class="fl">我的钱包</span><i class="fr arrow"> </i></a> </li>
                    <li><a href="mention-money.html" id="mention"><i><img src="image/mention.png" /></i><span>提币</span><i class="fr arrow"></i></a></li>
                    <li><a href="invite.html" id="invite"><i><img src="image/invite-friend.png" /></i><span>邀请好友</span><i class="fr arrow"></i></a></li>
                    <li><a href="setting.html" id="setting"><i><img src="image/setting.png" /></i><span>设置</span><i class="fr arrow"></i></a></li>
                </ul>
            </div>
        </div>
		<footer class="footer">
			<a href="index.html" class="space" id="wrill">
				<img src="image/base.png" class="space-img">
				<span >空投</span>
			</a>
			<a  class="space" id="user">
				<img src="image/personal-h.png" class="space-img">
				<span class="space-color">我的</span>
			</a>
		</footer>
	</body>
</html>
<script type="text/javascript">
    $(function () {
        var _height = $(document).height();
        $('.user').css('height', _height);

        var userid = getUserId();

        if (userid) {
            $('.layout').on('click', function () {
                layer.open({
                    content: '退出登录',
                    btn: '确定',
                    yes: function (index) {
                        reUserId();
                        layer.close(index);
                        window.location.href = "/index.html";
                    }
                });
            })
         }

	    $ajax(
		    url+'getMyBasicInfo.ashx',
		    'get',
		    {userid:userid},
		    function(data){
			    var data = data.data;
			    $('.info-pic').attr('src',data.userAvatar);
			    $('.user-name').html(data.userName);
                $('.user-rank').html('算力：' + data.totalKnowledge );
			    $('.user-ident').html(data.identity);			
			    $('.user-grade').html(data.grade);
		    },
		    function(data){
                loginRes();
		    }
        )
    })
</script>